package com.example.demo.UserController;

import com.example.demo.Model.Student;
import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;

@Component
public class User {
    @Value("${string.value}")
    private String name;

    @Autowired
    private Student student;

    @PostConstruct
    public void print() {
        System.out.println("name:" + name);
    System.out.println("Student:"+student);
    System.out.println(student);

    }
}
